package cn.aigoubuy.service;

import cn.aigoubuy.domain.User;

import java.sql.SQLException;

public interface UserService {
    /**
     * 注册
     * @param user
     * @throws SQLException
     */
    void regist(User user) throws SQLException;

    /**
     * 登录
     * @param user
     * @return
     * @throws SQLException
     */
    User login(User user) throws SQLException;

    /**
     * 激活用户
     * @param code
     * @throws SQLException
     */
    boolean activeUser(String code) throws SQLException;

    /**
     * 通过用户名查询用户
     * @param username
     * @return
     */
    User findByUsername(String username) throws SQLException;
}